﻿<s:TagVisualization x:Class="navigation.Contents.TagVisualTaskCard"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:s="http://schemas.microsoft.com/surface/2008"
             mc:Ignorable="d" 
             d:DesignHeight="250" d:DesignWidth="300">
    <s:TagVisualization.Resources>
        
        <DataTemplate x:Key="ScatterViewTaskItemDataTemplate">
            <!--<Border BorderBrush="White" BorderThickness="1" Width="Auto" Height="Auto" Padding="5">-->
                <Grid Background="AliceBlue" Width="200" Height="150">
                    <StackPanel Orientation="Vertical">
                        <TextBox Height="30" Width="100" HorizontalAlignment="Left" Text="{Binding TaskName,Mode=TwoWay}" FontFamily="Arial" FontSize="15" Background="Transparent" Foreground="Black" Focusable="True"/>
                        <TextBlock Margin="5,0,5,10" HorizontalAlignment="Left" Height="Auto" Text="{Binding TaskContent, Mode=TwoWay}" FontFamily="Arial" FontSize="11" Foreground="Black"/>
                    </StackPanel>
                </Grid>
            <!--</Border>-->
        </DataTemplate>

        <Style x:Key="ScatterTaskCursorStyle" TargetType="{x:Type ContentControl}">
            <Setter Property="ContentTemplate" Value="{StaticResource ScatterViewTaskItemDataTemplate}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ContentControl}">
                        <!--<Border BorderBrush="White" BorderThickness="1">-->
                        <ContentPresenter
                                Content="{TemplateBinding Content}" 
                                ContentTemplate="{TemplateBinding ContentTemplate}">
                        </ContentPresenter>
                        <!--</Border>-->
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="ListBoxItem" x:Key="ContainerStyle">
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Border Name="Border" Padding="2" SnapsToDevicePixels="true">
                            <ContentPresenter/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </s:TagVisualization.Resources>
    
    <Grid Background="AliceBlue">
        <!--<Ellipse Width="50" Height="50" Fill="Aquamarine"/>-->
        
        <!--<StackPanel Orientation="Vertical">
            <TextBlock Height="30" Text="Task Card" Foreground="Black"  FontSize="15" FontFamily="Tekton Pro" Margin="10,10,10,0"/>
            <Line Width="300" Stroke="Black" StrokeThickness="2"/>
            <TextBlock FontSize="13" Height="70" Width="280" Margin="10,0,10,0" Foreground="Black" Text="Touch here to add content..."/>
        </StackPanel>-->

        <s:SurfaceListBox Name="TaskTagHolder" ItemTemplate="{StaticResource ScatterViewTaskItemDataTemplate}" ItemContainerStyle="{StaticResource ContainerStyle}" ItemsSource="{Binding}"
                          PreviewTouchDown="TaskTagHolder_PreviewTouchDown">
        </s:SurfaceListBox>
    </Grid>
</s:TagVisualization>
